package org.primefaces.examples.moviecollector.service;

import org.primefaces.examples.moviecollector.dao.ComentariosDAO;
import org.primefaces.examples.moviecollector.domain.Comentrarios;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;



@Service("comentrariosService")
public class ComentrariosServicesImpl {
	
	private ComentariosDAO cometDAO;
	
	@Autowired
	public ComentrariosServicesImpl(ComentariosDAO cometDAO){
		this.cometDAO=cometDAO;
		
	}
	
	@Transactional
	public void guardarComentrarios(Comentrarios comet) {
		cometDAO.persist(comet);
		
	}

	@Transactional
	public void remove(Comentrarios comet) {
		cometDAO.delete(comet);
		
	}

	@Transactional
	public void update(Comentrarios comet) {
		cometDAO.update(comet);
		
	}

	

	

}
